package luogu;

public class Student {
    String name;
    int age ;
    int lastYearScore;

    public Student(String name,int age,int lastYearScore){
        this.name = name;
        this.age = age;
        this.lastYearScore = lastYearScore;
    }

    public void attendTraining(){
        this.age+=1 ;
        int score = (int) (this.lastYearScore * 1.2);
        this.lastYearScore = Math.min(score,600);
    }

    @Override
    public String toString() {
        return name + " "+age + " "+lastYearScore;
    }
}
